package com.zhongxi.guoyuan.entity.user;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/11/17.
 */

public class UserData {

    private String id;
    private String username;
    private String shopname;
    private String mphone;
    private String avatar;
    private String isshareholders;
    private String isprivilege;
    private String ismerchant;
    private String ctime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMphone() {
        return mphone;
    }

    public void setMphone(String mphone) {
        this.mphone = mphone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getShopname() {
        return shopname;
    }

    public void setShopname(String shopname) {
        this.shopname = shopname;
    }

    public String getIsshareholders() {
        return isshareholders;
    }

    public void setIsshareholders(String isshareholders) {
        this.isshareholders = isshareholders;
    }

    public String getIsprivilege() {
        return isprivilege;
    }

    public void setIsprivilege(String isprivilege) {
        this.isprivilege = isprivilege;
    }

    public String getIsmerchant() {
        return ismerchant;
    }

    public void setIsmerchant(String ismerchant) {
        this.ismerchant = ismerchant;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public static UserData parseMatch(JSONObject jsonObject) {
        UserData userData = new UserData();
        try{
            userData.setMphone(jsonObject.getString("mphone"));
            userData.setUsername(jsonObject.getString("username"));
        }catch (Exception e){
            e.printStackTrace();
        }
        return userData;
    }
}
